package com.gitee.melin.bee.core.jdbc.parser;

import com.gitee.melin.bee.core.jdbc.enums.DataSourceType;
import java.util.regex.Pattern;

public class DB2URLParser extends AbstractMatcherURLParser {

    private static final Pattern DB2_URL_PATTERN =
            Pattern.compile("jdbc:db2:\\/\\/(?<host>[^:\\/]+)(:(?<port>\\d+))?\\/(?<instance>[^:]+)(:(?<options>.*))?");

    public DB2URLParser() {
        super(DB2_URL_PATTERN, DataSourceType.DB2);
    }
}
